package core
{
import flash.net.SharedObject;

public class FlashCookie
{
    private static const NAME:String = "Atlantis_Cookie";
    
    private static var cookie:SharedObject;
    
    public static function initialize():void
    {
        cookie = SharedObject.getLocal(NAME);
    }
    
    public static function getData(key:String):*
    {
        return cookie.data[key];
    }
    
    public static function setData(key:String, value:*):void
    {
        cookie.data[key] = value;
    }
    
    public static function save():void
    {
        cookie.flush();
    }
}
}